package com.example.androidmaze;

import android.util.Log;
import android.view.View;

public class Singleton {
	private Maze maze;
	
	private static Singleton mInstance = null;
 
    private Singleton(){
    }
    
    public static Singleton getInstance(){
        if(mInstance == null)
        {
            mInstance = new Singleton();
        }
        return mInstance;
    }
 
    public Maze getMaze(){
        return this.maze;
    }
	
	public void setMaze(int algorithm, View view, int difficulty) {
		this.maze = new Maze(algorithm, view, difficulty);
		Log.v("Singleton", "setMaze(" + algorithm + ", " + view + ", " + difficulty+ ")");
		maze.init();
		Log.v("Singleton", "maze initialized");
	}
	
}
